package cn.com.jinhao.provider.business.mapper;

import cn.com.jinhao.hotline.commons.base.BaseMapper;
import cn.com.jinhao.provider.business.entity.WorkOrderCanceled;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * hotline-spring-cloud
 * <p>Description: </p>
 *
 * @author ShaneMew
 * @version 1.0
 * @date 2020/4/8
 * @since 2020-04-08
 */

@Repository
public interface CancelWorkOrderMapper extends BaseMapper<WorkOrderCanceled> {
    /**
     * 查询历史撤单记录
     * @param dispatchCode   派单编码
     * @return Integer 历史撤单数
     */
    @Select("SELECT COUNT(*) FROM BT$EVRV WHERE BT$EVAS_CODE=#{dispatchCode}")
    Integer countCancelHistory(@Param("dispatchCode") String dispatchCode);
}
